import request from "@/utils/request"

/**
 * 获取所有权限列表
 */
export function getAllQxList() {
    return request({
        url: '/sys/permission',
        method:'get'
    })
}

/**
 * 新增权限
 */
export function addQx(data) {
    return request({
        url: '/sys/permission',
        method: 'post',
        data
    })
}


/**
 * 删除权限
 */
export function reomveQx(id) {
    return request({
        url: `/sys/permission/${id}`,
        method:'delete'
    })
}


/**
 * 根据id获取权限详情
 */
export function getQx(id) {
    return request({
        url: `/sys/permission/${id}`,
        method:'get'
    })
}

//根据id修改权限
export function xiugaiQx(data) {
    return request({
        url: `/sys/permission/${data.id}`,
        method: 'put',
        data
    })
}